{extend name="layout/iframe" /}
{block name="pagecss"}
<style>
    .layui-form-select .layui-input{
        padding-right: 0;
        cursor: pointer;
    }
    input::-webkit-input-placeholder {
        text-align:right;
    }
</style>
{/block}
{block name="content"}
<div class="layui-card-body layui-layout-admin" style="padding: 15px;">
    <form class="layui-form" action="" lay-filter="component-form-group">
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required">*</span>姓名</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="name" lay-verify="required" placeholder="请输入" autocomplete="off" value="{$info.name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required">*</span>账号</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" lay-filter="number" name="login_name" lay-verify="required" placeholder="请输入" autocomplete="off" value="{$info.login_name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="password" name="password" placeholder="为空则不修改密码" autocomplete="off" class="layui-input" value="">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required">*</span>角色</label>
            <div class="layui-input-block">
                <select  name="role_id" lay-verify="required">
                    <option value=""></option>
                    {foreach $authRole as $v}
                    <option value="{$v.id}" {if $info.role_id == $v.id} selected {/if}>{$v.role_name}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <input type="hidden" name="id" value="{$info.id}">
        <div class="layui-form-item layui-row layui-col-xs12">
            <div class="layui-footer">
                <button type="button" class="layui-btn layui-btn-primary close-btn">取消</button>
                <button class="layui-btn" type="button" lay-submit="" lay-filter="laySave">保存 <i class="layui-icon">&#xe609;</i></button>
            </div>
        </div>
    </form>
</div>


<input type="hidden" class="token_url" value="{:url('admin/Image/token')}">
<input type="hidden" class="record_url" value="{:url('admin/Image/record')}">
<input type="hidden" class="delimage_url" value="{:url('admin/Image/delete')}">
<input type="hidden" class="save_url" value="{:url('admin/'.strtolower($model).'/editpost')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/admin/pages/js/promotion.js" type="text/javascript"></script>
{/block}